package com.menglei.dailytasks.broadcast;

import android.content.ComponentName;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.IBinder;
import android.view.View;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

import com.menglei.dailytasks.R;

public class BroadCastActivity extends AppCompatActivity implements View.OnClickListener {

    /**
     * 绑定广播
     */
    private Button mBtnBind;
    /**
     * 解绑广播
     */
    private Button mBtnUnbind;
    //
    private ServiceConnection conn=new ServiceConnection() {
        @Override
        public void onServiceConnected(ComponentName name, IBinder service) {

        }

        @Override
        public void onServiceDisconnected(ComponentName name) {

        }
    };
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_broad_cast);
        initView();
    }

    private void initView() {
        mBtnBind = (Button) findViewById(R.id.btn_bind);
        mBtnBind.setOnClickListener(this);
        mBtnUnbind = (Button) findViewById(R.id.btn_unbind);
        mBtnUnbind.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            default:
                break;
            case R.id.btn_bind:
                //Intent intent = new Intent(this,Bind)
                break;
            case R.id.btn_unbind:
                break;
        }
    }
}